package com.dsteiner.widgets.client.util;


import com.dsteiner.widgets.client.StringUtil;

public class ValidationUtil {

	public interface Error{

		String getMessage();

		boolean contains(String field);
	}
	
	public static boolean isValidEmail(String email){
		Error validate = Validator.EMAIL_VALIDATOR.validate(email);
		return validate == null || StringUtil.isEmpty(validate.getMessage());
	}
	
}
